package net.tp.algo.trie;

public interface Trie<V> {

	public int size();
	
	default public boolean empty() { return size() == 0; }
	
	public void put(String key, V value);
	
	public V get(String key);
	
	public V delete(String key);

	public Iterable<String> keys();
	
	public Iterable<String> keysWithPrefix(String s);

	/**
	 * Longest key that match the prefix of a given string.
	 * 
	 * @param s string
	 * @return longest match
	 */
	public String longestPrefixOf(String s);
	
}
